package trlygjj.tanruiliyigenjinjin.util;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * Created by user on 2018/7/8.
 */
@Setter
@Getter
@NoArgsConstructor
public class JsonResult {
    /**
     * 默认为成功返回Json数据
     */
    private boolean success = true;
    /**
     * 错误信息
     */
    private String msg;

    /**
     * 使用构造器设置默认信息
     * @param msg
     */
    public JsonResult(String msg){
        this.msg = msg;
    }
    /**
     * 失败的时候设置错误信息
     */
    public void mark(String msg){
        this.success = false;
        this.msg = msg;
    }
}
